package cn.zb.service;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import cn.zb.dao.SectionDao;
import cn.zb.dao.TopicDao;
import cn.zb.pojo.Section;
import cn.zb.pojo.Topic;
@Service
public class ForumService {
	@Resource
	private SectionDao sectionDao;	
	@Resource
	private TopicDao topicDao;
	@Transactional
	public List<Section> getTree(){
		return (List<Section>) sectionDao.select();
	}
	@Transactional
	public List<Topic> getTopics(int id){
		return topicDao.select(id);
	}

}
